package com.markyao.mapper;

import com.markyao.vo.QueryParams;
import com.markyao.vo.pojo.HisConfigInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface HisConfigInfoMapper {

    int insert(HisConfigInfo hisConfigInfo);
    int insertBatch(@Param("hisConfigInfoList") List<HisConfigInfo> hisConfigInfoList);
    int updateById(HisConfigInfo insertHisConfig);
    int deleteBatch(@Param("ids") String[] ids);

    @Select("select id,data_id,group_id,app_name,gmt_create,src_user from his_config_info where data_id=#{dataId}")
    List<HisConfigInfo> selectByDataId(String dataId);

    @Select("select id,data_id,group_id,app_name,gmt_create,src_user  from his_config_info where app_name=#{appName}")
    List<HisConfigInfo> selectByAppName(String appName);

    @Select("select id,data_id,group_id,app_name,gmt_create,src_user  from his_config_info ")
    List<HisConfigInfo> selectList();


    @Select("select id,data_id,content,group_id,app_name,gmt_create,src_user  from his_config_info where id=#{id}")
    HisConfigInfo selectOneById(String id);


    @Select("SELECT * FROM his_config_info ${sql}")
    List<HisConfigInfo> selectListByQuery(@Param("queryParam")QueryParams queryParams,@Param("sql") String sql);



}
